package backend;

import java.util.Map;

public class static_methods {

	public static void error(int index) { // prints the line where the first
		// line occurs and halts
		System.out.println("Error at line " + index);
		System.exit(0);
	}

	public static boolean checkPresence(String s, Map<String, Integer> reg) {
		// checks if the given string is a key in the reg map if not it prints
		// an error
		if (reg.containsKey(s))
			return true;
		return false;
	}
}
